package cn.jett.domain.strategy.model.entity;

import cn.jett.domain.strategy.model.vo.RuleLogicCheckTypeVO;
import lombok.*;

/**
 * @Author 战斗天使
 * @Description 规则动作实体 -封装了规则过滤后的规则值（规则能够抽取奖品id）
 * @Date 2024/6/17
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class RuleActionEntity<T extends RuleActionEntity.RaffleEntity>{

    private String code = RuleLogicCheckTypeVO.TRUE.getCode();

    private String info = RuleLogicCheckTypeVO.TRUE.getInfo();

    private String ruleModel;

    private T data;


    static public class RaffleEntity{

    }

    @EqualsAndHashCode(callSuper = true)
    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    static public class RaffleBeforeEntity extends RaffleEntity{
        //策略id
        private Long strategyId;
        //规则权重值key，用于抽奖时可以选择权重抽奖
        private String ruleWeightValueKey;
        //奖品id
        private Integer awardId;
    }

    static public class RaffleCenterEntity extends RaffleEntity{

    }

    static public class RaffleAfterEntity extends RaffleEntity{

    }

}
